package net.tycmc.cty.ctyms.web.Action;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.ServletResponseAware;

import com.opensymphony.xwork2.ActionSupport;

public class BaseActionS2 extends ActionSupport implements ServletRequestAware,
		ServletResponseAware {

	private static final long serialVersionUID = -3323599742271221588L;

	public HttpServletRequest request = null;
	public HttpServletResponse response = null;
	public HttpSession session = null;
	public Map<String, String> search_param = new HashMap<String, String>();

	// 实现接口中的方法
	public void setServletRequest(HttpServletRequest req) {
		this.request = req;
		this.session = req.getSession(false);
		search_param = (Map<String, String>) req.getAttribute("search_param");
	}

	public void setServletResponse(HttpServletResponse res) {
		this.response = res;
	}

}
